package com.monitor.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.monitor.entity.JfzCarType;
import org.apache.ibatis.annotations.*;

@Mapper
public interface JfzCarTypeMapper extends BaseMapper<JfzCarType> {
	@Select("SELECT * FROM jfz_car_type WHERE car_id=#{carId}")
	public JfzCarType selectByCarId(@Param("carId")int carId);
	
	@Insert("INSERT INTO jfz_car_type(type,car_id) VALUES(#{ct.type},#{ct.carId})")
	public Integer insert1(@Param("ct")JfzCarType ct);
	
	@Update("UPDATE jfz_car_type SET type=#{ct.type} WHERE id=#{ct.id}")
	public Integer updateType(@Param("ct")JfzCarType ct);
}
